/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package extension.room.handler;

import com.smartfoxserver.v2.entities.User;
import com.smartfoxserver.v2.entities.data.ISFSObject;
import com.smartfoxserver.v2.extensions.BaseClientRequestHandler;
import extension.room.phom.PhomExtension;
import extension.room.phom.PhomGame;
import extension.room.phom.PhomPlayer;
import log.Debug;

/**
 *
 * @author daz
 */
public class MorePhomHandler extends BaseClientRequestHandler {

    @Override
    public void handleClientRequest(User user, ISFSObject params) {
        Debug.d("show more phom handler:" + user.getName());
        PhomExtension tienlenExtension = (PhomExtension) getParentExtension();
        PhomGame game = tienlenExtension.getGame();
//        game.playerShowPhom();
        PhomPlayer p = game.getPlayerFight();
        game.setLastShowPhom();
        tienlenExtension.getResponse().notifyPhomMore(p.getHavePhom(), p.getListPhomMore(), p.getSeatPos());
        p.removePhom();
        game.depositAction();
    }
}
